home *** CD-ROM | disk | FTP | other *** search
- Path: newsbf02.news.aol.com!not-for-mail
- From: weatby@aol.com (Weatby)
- Newsgroups: comp.lang.c++
- Subject: Memory deallocation in C and C++
- Date: 13 Jan 1996 03:40:57 -0500
- Organization: America Online, Inc. (1-800-827-6364)
- Sender: root@newsbf02.news.aol.com
- Message-ID: <4d7r6p$dvg@newsbf02.news.aol.com>
- Reply-To: weatby@aol.com (Weatby)
- NNTP-Posting-Host: newsbf02.mail.aol.com
-
- delete() and free() can cause problems on at least some compilers if
- called with an invalid pointer.
-
- It would seem to me that a better idea would be that if the pointer passed
- hasn't been allocated by the memory management system, it could just be
- ignored, instead of causing a crash as does on my compiler.
-
- Or, a return value could be added to indicate a bad status.
-
- Any comments/ideas on why these are not done?
-
- Thanks.
-
- Bob
-